/*
 * @Author: c.k
 * @文件说明: 所有路由处理
 */
import test from "./test";
import home from "./home";
import agent from "./agent";
import mine from "./mine";
import result from "./result";

let all = [...test, ...home,...agent,...mine,...result];

let routes = all.map(val => {
  val.name = val.path;
  val.path = "/" + val.path;
  val.component = resolve => {
    // 按需加载
    require(["@/views/" + val.src + ".vue"], resolve).default;
  };
  return val;
});

export default routes;
